import request from '@/utils/request'

export function submit(data) {
  return request({
    url: 'buss/qualityInspection/add',
    method: 'post',
    data
  })
}

export function getOne(id) {
  return request.get('buss/qualityInspection/getOne?id=' + id)
}

export function getTablePage(data) {
  return request.post('buss/qualityInspection/listPage', data)
}

export function del(ids) {
  return request({
    url: 'buss/qualityInspection/del',
    method: 'post',
    data: ids
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/qualityInspection/edit',
    method: 'post',
    data
  })
}

export function audit(data) {
  return request({
    url: 'buss/qualityInspection/audit',
    method: 'post',
    data
  })
}


export function report(data) {
  return request({
    url: 'buss/qualityInspection/report',
    method: 'post',
    data
  })
}

export function downfile(data) {
  return request({
    method: 'post',
    url: 'buss/qualityInspection/downfile?name=SalaryManage',
    data: data,
    responseType: 'blob'
  })
}

export function exportExcel(data) {
  return request({
    method: 'post',
    url: 'buss/qualityInspection/exportExcel',
    data: data,
    responseType: 'blob'
  })
}

export function importExcel(data) {
  return request.post('buss/qualityInspection/importExcel', data)
}

export function getProblemNum(data) {
  return request.post('buss/qualityInspection/getProblemNum', data)
}

export function getRectificationSituation(data) {
  return request.post('buss/qualityInspection/getRectificationSituation', data)
}

export function getRectificSituationList(data) {
  return request.post('buss/qualityInspection/getRectificSituationList', data)
}


export default {
  submit,
  getOne,
  del,
  resubmit,
  audit,
  report,
  getTablePage,
  downfile,
  exportExcel,
  importExcel,
  getProblemNum,
  getRectificationSituation,
  getRectificSituationList
}
